import React, {Component} from 'react';
import cssModule from './nav.module.less'

import {withRouter} from 'react-router-dom'  // 作用：非路由组件取path值

class Nav extends Component {

    onGoTo = (url) => this.props.history.push(url)

    render() {
        return (
            <div className={cssModule.box}>
                <i className={`iconfont ${cssModule.iconfont}`}>&#xe81a;</i>
                <i className={`iconfont ${cssModule.iconfont}`} onClick={() => this.onGoTo('/Setting')}>&#xe81b;</i>
            </div>
        );
    }
}

export default withRouter(Nav);